import HeaderAsideLayout from "@/layouts/HeaderAsideLayout";
import NotFound from "@/views/NotFound";

const routerConfig = [
  {
    path: "/appLogin",
    name:'appLogin',
    component: () => import("@/views/login/appLogin.vue")
  },
  {
    path: "/login",
    name:'login',
    component: () => import("@/views/login/login.vue")
  },
  {
    path: "/register",
    name:'register',
    component: () => import("@/views/login/register.vue")
  },
  {
    path: "/enter",
    name:'enter',
    component: () => import("@/views/login/enter.vue")
  },
  {
    path: "/",
    name:'login',
    component: () => import("@/views/login/login.vue")
  },
  {
    path: "/registration",
    component: HeaderAsideLayout,
    children: [
      { path: "/", component: () => import("@/views/registration/index.vue") }
    ]
  },
  {
    path: "/issueDrug",
    component: HeaderAsideLayout,
    children: [
      { path: "/", component: () => import("@/views/issueDrug/index.vue") }
    ]
  },
  {
    path: "/outpatient",
    component: HeaderAsideLayout,
    children: [
      {
        path: "/outpatient",
        name: "outpatient",
        component: () => import("@/views/outpatient/index.vue")
      }
    ]
  },
  {
    path: "/payOrDrug",
    component: HeaderAsideLayout,
    children: [
      {
        path: "/",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/",
            component: () => import("@/views/payOrDrug/payDrug/index.vue")
          }
        ]
      },
      {
        path: "payDrug",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/",
            name: "payDrug",
            component: () => import("@/views/payOrDrug/payDrug/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/payOrDrug"
            }
          }
        ]
      },
      {
        path: "noPayList",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/",
            name: "noPayList",
            component: () => import("@/views/payOrDrug/noPayList/index.vue"),
            meta: {
              keepAlive:true,
              guidePath: true,
              jumpPath: "/payOrDrug",
              selfPath:true,
            }
          }
        ]
      },
      {
        path: "noPayList",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/payOrDrug/noPayList/noPayDetails",
            name: "noPayDetails",
            component: () => import("@/views/payOrDrug/noPayDetails/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/payOrDrug",
            }
          }
        ]
      },
      {
        path: "payList",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/",
            name: "payList",
            component: () => import("@/views/payOrDrug/payList/index.vue"),
            meta: {
              keepAlive:true,
              guidePath: true,
              jumpPath: "/payOrDrug",
              selfPath:true,
            }
          }
        ]
      },
      {
        path: "payList",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/payOrDrug/payList/payDetails",
            name: "payDetails",
            component: () => import("@/views/payOrDrug/payDetails/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/payOrDrug"
            }
          }
        ]
      },
      {
        path: "payList",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/payOrDrug/payList/addRefund",
            name: "addRefund",
            component: () => import("@/views/payOrDrug/addRefund/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/payOrDrug"
            }
          }
        ]
      },
      {
        path: "refundList",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/",
            name: "refundList",
            component: () => import("@/views/payOrDrug/refundList/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/payOrDrug",
              keepAlive:true,
              selfPath:true,
            }
          }
        ]
      },
      {
        path: "refundList",
        component: () => import("@/views/payOrDrug/index.vue"),
        children: [
          {
            path: "/payOrDrug/refundList/refundDetails",
            name: "refundDetails",
            component: () =>
              import("@/views/payOrDrug/refundDetails/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/payOrDrug"
            }
          }
        ]
      }
    ]
  },
  //患者管理
  {
    path: "/patient",
    component: HeaderAsideLayout,
    children: [
      {
        path: "/",
        component: () => import("@/views/patient/index.vue"),
        children: [
          {
            path: "/",
            component: () => import("@/views/patient/patientList/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/patient",
              selfPath:true,
              keepAlive:true,
            }
          }
        ]
      },
      {
        path: "patientList",
        component: () => import("@/views/patient/index.vue"),
        children: [
          {
            path: "/",
            name: "patientList",
            component: () => import("@/views/patient/patientList/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/patient",
              selfPath:true,
              keepAlive:true,
            }
          }
        ]
      },
      {
        path: "patientDetails",
        component: () => import("@/views/patient/index.vue"),
        children: [
          {
            path: "/",
            name: "patientDetails",
            component: () => import("@/views/patient/patientDetails/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/patient"
            }
          }
        ]
      },
      {
        path: "outpatientDetails",
        component: () => import("@/views/patient/index.vue"),
        children: [
          {
            path: "/",
            name: "outpatientDetails",
            component: () =>
              import("@/views/patient/outpatientDetails/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/patient"
            }
          }
        ]
      }
    ]
  },
  //诊所管理
  {
    path: "/clinicManagement",
    component: HeaderAsideLayout,
    children: [
      {
        path: "/",

        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "clinicManagement",
            component: () =>
              import("@/views/clinicManagement/registerInfo/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      {
        path: "registerInfo",

        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "registerInfo",
            component: () =>
              import("@/views/clinicManagement/registerInfo/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      //个人设置
      {
        path: "setting",
        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "setting",
            component: () =>
              import("@/views/clinicManagement/setting/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      // 创建账号
      {
        path: "createID",
        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/clinicManagement/personnelManagement/createID",
            name: "createID",
            component: () =>
              import("@/views/clinicManagement/createID/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      // 编辑账号
      {
        path: "editID",
        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/clinicManagement/personnelManagement/editID",
            name: "editID",
            component: () =>
              import("@/views/clinicManagement/editID/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      {
        path: "personnelManagement",

        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "personnelManagement",
            component: () =>
              import("@/views/clinicManagement/personnelManagement/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      {
        path: "departmentManagement",

        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "departmentManagement",
            component: () =>
              import("@/views/clinicManagement/departmentManagement/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      {
        path: "checkSetting",

        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "checkSetting",
            component: () =>
              import("@/views/clinicManagement/checkSetting/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      {
        path: "surcharge",
        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "checkSetting",
            component: () =>
              import("@/views/clinicManagement/surcharge/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      {
        path: "registrationFeeSetting",

        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "registrationFeeSetting",
            component: () =>
              import(
                "@/views/clinicManagement/registrationFeeSetting/index.vue"
              ),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      },
      {
        path: "systemSetting",

        component: () => import("@/views/clinicManagement/index.vue"),
        children: [
          {
            path: "/",
            name: "systemSetting",
            component: () =>
              import("@/views/clinicManagement/systemSetting/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/clinicManagement"
            }
          }
        ]
      }
    ]
  },
  // 模板模块
  {
    path: "/templates",
    component: HeaderAsideLayout,
    children: [
      {
        path: "/",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/",
            name: "templates",
            component: () =>
              import("@/views/templates/personalPrescription/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      {
        path: "personalPrescription",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/",
            name: "personalPrescription",
            component: () =>
              import("@/views/templates/personalPrescription/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      {
        path: "clinicPrescription",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/",
            name: "clinicPrescription",
            component: () =>
              import("@/views/templates/clinicPrescription/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      {
        path: "medicalAdvice",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/",
            name: "medicalAdvice",
            component: () =>
              import("@/views/templates/medicalAdvice/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      // 新建医嘱
      {
        path: "createMedicalAdvice",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/templates/medicalAdvice/createMedicalAdvice",
            name: "createMedicalAdvice",
            component: () =>
              import("@/views/templates/createMedicalAdvice/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      // 创建成药处方---个人
      {
        path: "createMedicinePrescription",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/templates/personalPrescription/createMedicinePrescription",
            name: "createMedicinePrescription",
            component: () =>
              import("@/views/templates/createMedicinePrescription/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      // 创建饮片处方---个人
      {
        path: "createYinpianPrescription",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/templates/personalPrescription/createYinpianPrescription",
            name: "createYinpianPrescription",
            component: () =>
              import("@/views/templates/createYinpianPrescription/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      // 创建输液处方---个人
      {
        path: "createTransfusionPrescription",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path:
              "/templates/personalPrescription/createTransfusionPrescription",
            name: "createTransfusionPrescription",
            component: () =>
              import(
                "@/views/templates/createTransfusionPrescription/index.vue"
              ),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      // 创建成药处方---诊所
      {
        path: "createCYPrescription",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/templates/clinicPrescription/createCYPrescription",
            name: "createCYPrescription",
            component: () =>
              import("@/views/templates/createMedicinePrescription/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      // 创建饮片处方---诊所
      {
        path: "createYPPrescription",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/templates/clinicPrescription/createYPPrescription",
            name: "createYPPrescription",
            component: () =>
              import("@/views/templates/createYinpianPrescription/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      },
      // 创建输液处方---诊所
      {
        path: "createTFPrescription",
        component: () => import("@/views/templates/index.vue"),
        children: [
          {
            path: "/templates/clinicPrescription/createTFPrescription",
            name: "createTFPrescription",
            component: () =>
              import(
                "@/views/templates/createTransfusionPrescription/index.vue"
              ),
            meta: {
              guidePath: true,
              jumpPath: "/templates"
            }
          }
        ]
      }
    ]
  },
  //药品管理
  {
    path: "/drugsManagement",
    component: HeaderAsideLayout,
    children: [
      {
        path: "/",
        component: () => import("@/views/drugsManagement/index.vue"),
        children: [
          {
            path: "/drugsManagement/drugInformationManagement",
            name: "drugInformationManagement",
            component: () =>
              import(
                "@/views/drugsManagement/drugInformationManagement/index.vue"
              ),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/newDrugs",
            name: "newDrugs",
            component: () =>
              import("@/views/drugsManagement/newDrugs/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },

          {
            path: "/drugsManagement/warehouseManagement/newEditWarehouse",
            name: "newEditWarehouse",
            component: () =>
              import("@/views/drugsManagement/newEditWarehouse/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/pushWarehouse",
            name: "pushWarehouse",
            component: () =>
              import("@/views/drugsManagement/pushWarehouse/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/popWarehouse/index",
            name: "popWarehouse",
            component: () =>
              import("@/views/drugsManagement/popWarehouse/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/Inventory",
            name: "Inventory",
            component: () =>
              import("@/views/drugsManagement/Inventory/allInventory.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/wareHouseWarning",
            name: "wareHouseWarning",
            component: () =>
              import("@/views/drugsManagement/wareHouseWarning/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/validityWarning",
            name: "validityWarning",
            component: () =>
              import("@/views/drugsManagement/validityWarning/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/clinicalZone",
            name: "clinicalZone",
            component: () =>
              import("@/views/drugsManagement/clinicalZone/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/warehouseManagement",
            name: "warehouseManagement",
            component: () =>
              import("@/views/drugsManagement/warehouseManagement/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/",
            // name: "drugInformationManagement",
            component: () =>
              import(
                "@/views/drugsManagement/drugInformationManagement/index.vue"
              ),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/pushWarehouse/storageLog",
            name: "storageLog",
            component: () =>
              import("@/views/drugsManagement/storageLog/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/popWarehouse",
            name: "newOutbound",
            component: () =>
              import("@/views/drugsManagement/popWarehouse/newOutbound.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/Inventory/index",
            name: "allInventory",
            component: () =>
              import("@/views/drugsManagement/Inventory/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          },
          {
            path: "/drugsManagement/Inventory/index/details",
            name: "allInventoryDetails",
            component: () =>
              import("@/views/drugsManagement/Inventory/details.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/drugsManagement"
            }
          }
        ]
      }
    ]
  },
  //统计
  {
    path: "/statistical",
    component: HeaderAsideLayout,
    children: [
      //财务查询
      {
        path: "/",
        component: () => import("@/views/statistical/index.vue"),
        children: [
          {
            path: "/",
            component: () =>
              import("@/views/statistical/financialQuery/index.vue")
          }
        ]
      },
      //财务查询
      {
        path: "/",
        component: () => import("@/views/statistical/index.vue"),
        children: [
          {
            path: "/statistical/financialQuery",
            component: () =>
              import("@/views/statistical/financialQuery/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/statistical"
            }
          }
        ]
      },
      //财务详情
      {
        path: "/",
        component: () => import("@/views/statistical/index.vue"),
        children: [
          {
            path: "/statistical/financialQuery/detail/",
            component: () =>
              import("@/views/statistical/financialQuery/detail.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/statistical"
            }
          }
        ]
      },
      {
        path: "/",
        component: () => import("@/views/statistical/index.vue"),
        children: [
          {
            path: "/statistical/serviceLog/detail/",
            component: () =>
              import("@/views/statistical/financialQuery/detail.vue"),
            meta: {
              guidePath: true,
              jumpPath: "statistical"
            }
          }
        ]
      },
      //门诊日志
      {
        path: "/",
        component: () => import("@/views/statistical/index.vue"),
        children: [
          {
            path: "/statistical/serviceLog",
            component: () => import("@/views/statistical/serviceLog/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/statistical"
            }
          }
        ]
      },
      //销售明细
      {
        path: "/",
        component: () => import("@/views/statistical/index.vue"),
        children: [
          {
            path: "/statistical/salesDetail",
            component: () =>
              import("@/views/statistical/salesDetail/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/statistical"
            }
          }
        ]
      },
      //医生工作统计
      {
        path: "/",
        component: () => import("@/views/statistical/index.vue"),
        children: [
          {
            path: "/statistical/doctorWork",
            component: () => import("@/views/statistical/doctorWork/index.vue"),
            meta: {
              guidePath: true,
              jumpPath: "/statistical"
            }
          }
        ]
      }
    ]
  },
  {
    path: "*",
    name:'login',
    component: () => import("@/views/login/login.vue")
  },
  // { path: "*", component: NotFound }
];

export default routerConfig;
